//
// Created by Max on 2025/5/13.
//

#ifndef ALL_MIC_DETECT_ANALYSIS_FILE_H
#define ALL_MIC_DETECT_ANALYSIS_FILE_H

#include "iostream"
#include "vector"


using namespace std;

class AnalysisFile {
public:
    AnalysisFile();
    ~AnalysisFile();
public:

    int getFileSize(const char *fileName);
    int wav2Pcm(const char *wavFile, const char *pcmFile);
    int departChannel(const char *fileName, int channelIndex, int channelMaxNum);
    int fftChannel(const char *path, int fftSize, int sampleRate,double &dbValue);
    int fftChannel(const char *path,int loopNum,double &dbValue);
    int getDb(const char *path, int fftSize, int sampleRate,int offset,double &dbValue);
    bool checkMic(std::vector <double> &value);
};


#endif //ALL_MIC_DETECT_ANALYSIS_FILE_H
